package com.qs.questionnairesurveysystem.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Collection;

//CREATE TABLE admin (
//        adminId BIGINT AUTO_INCREMENT PRIMARY KEY,
//        name VARCHAR(255) NOT NULL,
//        department VARCHAR(255),
//        history TEXT,
//                               `limit` text,  -- 限制字段
//        password VARCHAR(255) NOT NULL
//);

//-- 插入测试数据
//INSERT INTO admin (name, department, history, `limit`, password) VALUES
//('root', 'Human Resources', 'Alice has 5 years of experience in HR.', 'admin, manager', 'root'),


@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "Represents an admin user in the system with roles and permissions.")
public class Admin {

    @ApiModelProperty(value = "The unique ID of the admin", example = "1")
    private Long adminId;

    @ApiModelProperty(value = "The name of the admin", example = "John Doe")
    private String name;

    @ApiModelProperty(value = "The department to which the admin belongs", example = "IT")
    private String department;

    @ApiModelProperty(value = "A brief history of the admin", example = "5 years of experience in managing IT systems")
    private String history;

    @ApiModelProperty(value = "The access level or permissions of the admin", example = "Admin")
    private String limit;

    @ApiModelProperty(value = "The admin's password", example = "password123")
    private String password; // 密码

    public Admin(String name, String password) {
        this.name = name;
        this.password = password;
    }

}
